<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ClaraGenomicsAnalysis: common/io/include/claragenomics/io/fasta_parser.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ClaraGenomicsAnalysis
   &#160;<span id="projectnumber">0.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_e48b4a17d37f1148862a6ed3f83bdb40.html">io</a></li><li class="navelem"><a class="el" href="dir_496653a55fb037d863eb64e0cef0e330.html">include</a></li><li class="navelem"><a class="el" href="dir_5e4218589a49834876e69d5129e12742.html">claragenomics</a></li><li class="navelem"><a class="el" href="dir_9d5ac01351caa32cb63ccb42b8477d37.html">io</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">fasta_parser.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">* Copyright (c) 2019, NVIDIA CORPORATION.  All rights reserved.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">* NVIDIA CORPORATION and its licensors retain all intellectual property</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">* and proprietary rights in and to this software, related documentation</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">* and any modifications thereto.  Any use, reproduction, disclosure or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">* distribution of this software and related documentation without an express</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">* license agreement from NVIDIA CORPORATION is strictly prohibited.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span>claragenomics</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span>io</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="structclaragenomics_1_1io_1_1FastaSequence.html">   21</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structclaragenomics_1_1io_1_1FastaSequence.html#aea0664ca6e856203c4b954b519183bec">   24</a></span>&#160;    std::string <a class="code" href="structclaragenomics_1_1io_1_1FastaSequence.html#aea0664ca6e856203c4b954b519183bec">name</a>;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structclaragenomics_1_1io_1_1FastaSequence.html#a9ac5e894fc08745c47b326a7038aa488">   26</a></span>&#160;    std::string <a class="code" href="structclaragenomics_1_1io_1_1FastaSequence.html#a9ac5e894fc08745c47b326a7038aa488">seq</a>;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;} <a class="code" href="structclaragenomics_1_1io_1_1FastaSequence.html">FastaSequence</a>;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1io_1_1FastaParser.html">   31</a></span>&#160;<span class="keyword">class </span><a class="code" href="classclaragenomics_1_1io_1_1FastaParser.html">FastaParser</a></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classclaragenomics_1_1io_1_1FastaParser.html#a213af5341107ea254176add6dd1dfd2d">~FastaParser</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keyword">virtual</span> int32_t <a class="code" href="classclaragenomics_1_1io_1_1FastaParser.html#a04f6deee5108374fa485487e06e759e5">get_num_seqences</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="structclaragenomics_1_1io_1_1FastaSequence.html">FastaSequence</a> <a class="code" href="classclaragenomics_1_1io_1_1FastaParser.html#a04a44819b81a93711295198492cc3765">get_sequence_by_id</a>(int32_t <span class="keywordtype">id</span>) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="structclaragenomics_1_1io_1_1FastaSequence.html">FastaSequence</a> <a class="code" href="classclaragenomics_1_1io_1_1FastaParser.html#ad37d794106d347d1d360d62db2d31cda">get_sequence_by_name</a>(<span class="keyword">const</span> std::string&amp; name) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;};</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;std::unique_ptr&lt;FastaParser&gt; create_fasta_parser(<span class="keyword">const</span> std::string&amp; fasta_file);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;} <span class="comment">// namespace io</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;} <span class="comment">// namespace claragenomics</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="astructclaragenomics_1_1io_1_1FastaSequence_html"><div class="ttname"><a href="structclaragenomics_1_1io_1_1FastaSequence.html">claragenomics::io::FastaSequence</a></div><div class="ttdoc">A structure to hold details of a single FASTA entry.</div><div class="ttdef"><b>Definition:</b> fasta_parser.hpp:21</div></div>
<div class="ttc" id="aclassclaragenomics_1_1io_1_1FastaParser_html_a213af5341107ea254176add6dd1dfd2d"><div class="ttname"><a href="classclaragenomics_1_1io_1_1FastaParser.html#a213af5341107ea254176add6dd1dfd2d">claragenomics::io::FastaParser::~FastaParser</a></div><div class="ttdeci">virtual ~FastaParser()=default</div><div class="ttdoc">FastaParser implementations can have custom destructors, so delcare the abstract dtor as default.</div></div>
<div class="ttc" id="astructclaragenomics_1_1io_1_1FastaSequence_html_aea0664ca6e856203c4b954b519183bec"><div class="ttname"><a href="structclaragenomics_1_1io_1_1FastaSequence.html#aea0664ca6e856203c4b954b519183bec">claragenomics::io::FastaSequence::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">Name of sequence.</div><div class="ttdef"><b>Definition:</b> fasta_parser.hpp:24</div></div>
<div class="ttc" id="aclassclaragenomics_1_1io_1_1FastaParser_html_a04f6deee5108374fa485487e06e759e5"><div class="ttname"><a href="classclaragenomics_1_1io_1_1FastaParser.html#a04f6deee5108374fa485487e06e759e5">claragenomics::io::FastaParser::get_num_seqences</a></div><div class="ttdeci">virtual int32_t get_num_seqences() const =0</div><div class="ttdoc">Return number of sequences in FASTA file.</div></div>
<div class="ttc" id="aclassclaragenomics_1_1io_1_1FastaParser_html"><div class="ttname"><a href="classclaragenomics_1_1io_1_1FastaParser.html">claragenomics::io::FastaParser</a></div><div class="ttdef"><b>Definition:</b> fasta_parser.hpp:31</div></div>
<div class="ttc" id="aclassclaragenomics_1_1io_1_1FastaParser_html_a04a44819b81a93711295198492cc3765"><div class="ttname"><a href="classclaragenomics_1_1io_1_1FastaParser.html#a04a44819b81a93711295198492cc3765">claragenomics::io::FastaParser::get_sequence_by_id</a></div><div class="ttdeci">virtual FastaSequence get_sequence_by_id(int32_t id) const =0</div><div class="ttdoc">Fetch an entry from the FASTA file by index position in file.</div></div>
<div class="ttc" id="astructclaragenomics_1_1io_1_1FastaSequence_html_a9ac5e894fc08745c47b326a7038aa488"><div class="ttname"><a href="structclaragenomics_1_1io_1_1FastaSequence.html#a9ac5e894fc08745c47b326a7038aa488">claragenomics::io::FastaSequence::seq</a></div><div class="ttdeci">std::string seq</div><div class="ttdoc">Base pair representation of sequence.</div><div class="ttdef"><b>Definition:</b> fasta_parser.hpp:26</div></div>
<div class="ttc" id="aclassclaragenomics_1_1io_1_1FastaParser_html_ad37d794106d347d1d360d62db2d31cda"><div class="ttname"><a href="classclaragenomics_1_1io_1_1FastaParser.html#ad37d794106d347d1d360d62db2d31cda">claragenomics::io::FastaParser::get_sequence_by_name</a></div><div class="ttdeci">virtual FastaSequence get_sequence_by_name(const std::string &amp;name) const =0</div><div class="ttdoc">Fetch an entry from the FASTA file by name.</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
